<html>
<head><meta charset="utf-8"><title>Panic in VFS · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Panic.20in.20VFS.html">Panic in VFS</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="202093936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Panic%20in%20VFS/near/202093936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Panic.20in.20VFS.html#202093936">(Jun 26 2020 at 14:01)</a>:</h4>
<p>I'm playing around with analysis-bench and <a href="http://prime_caches.rs">prime_caches.rs</a> and hit this VFS assertion:</p>
<div class="codehilite"><pre><span></span><code>thread &#39;main&#39; panicked at &#39;assertion failed: res.pop()&#39;, crates/vfs/src/vfs_path.rs:107:13
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: std::panicking::begin_panic
  12: vfs::vfs_path::VfsPath::join
  13: vfs::file_set::FileSet::resolve_path
  14: &lt;ra_db::FileLoaderDelegate&lt;&amp;T&gt; as ra_db::FileLoader&gt;::resolve_path
  15: &lt;ra_ide_db::RootDatabase as ra_db::FileLoader&gt;::resolve_path
  16: ra_hir_def::nameres::mod_resolution::ModDir::resolve_declaration
</code></pre></div>


<p><span class="user-mention" data-user-id="133169">@matklad</span> any idea what could be causing this?</p>



<a name="202094499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Panic%20in%20VFS/near/202094499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Panic.20in.20VFS.html#202094499">(Jun 26 2020 at 14:05)</a>:</h4>
<p>Huh, so this means that something is trying to get a parent of an empty path</p>



<a name="202094590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Panic%20in%20VFS/near/202094590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Panic.20in.20VFS.html#202094590">(Jun 26 2020 at 14:06)</a>:</h4>
<p>We probably should resoved unresolved module in this case, but we probably shouldn't do this in the frist place...</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>